package org.jeecg.modules.demo.crm.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.jeecg.modules.demo.crm.entity.CContractorInfo;
import org.jeecg.modules.demo.crm.entity.CSubProjectTask;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 子项任务表
 * @Author: jeecg-boot
 * @Date:   2025-05-31
 * @Version: V1.0
 */
public interface CSubProjectTaskMapper extends BaseMapper<CSubProjectTask> {

    @Update("update c_sub_project_task set status=#{status} where sub_project_id= #{subProjectId} and del_flag =1 ")
    void updateStatus(@Param("subProjectId") String subProjectId, @Param("status") String status);


    @Update("update c_sub_project_task set del_flag=1 where sub_project_id= #{subProjectId} ")
    void deleteBySubProjectId(@Param("subProjectId") String subProjectId);

    @Select("select * from c_sub_project_task where del_flag = 0 and sub_project_id = #{subProjectId}")
    List<CSubProjectTask> findBySubProjectId(@Param("subProjectId") String subProjectId);

    @Select("select  * from c_sub_project_task where del_flag = 0 and sub_project_id = #{subProjectId}")
    List<CSubProjectTask> contractorInfoList(@Param("subProjectId")String subProjectId);

}
